package com.zk;

import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;

import java.io.IOException;

/**
 * @author: LI-CI-GAO
 * 作者: licigao
 * 日期: 2021/8/31  19:09
 * 描述:
 */
public class TestZkMain {
    public static void main(String[] args) throws IOException {

        ZooKeeper zooKeeper=new ZooKeeper("loclahost:2181", 5000, new Watcher() {
            @Override
            public void process(WatchedEvent event) {
                System.out.println("--getPath-->"+event.getPath());
            }
        });




    }
}
